/*
Copyright (C) 2018 Itoh Laboratory, Tokyo Institute of Technology

This file is part of GINGER.

GINGER is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GINGER is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with GINGER; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

/*
Nextflow configuration file format:
https://www.nextflow.io/docs/latest/config.html#configuration-file
*/

params {
    /****************************************
     Input
     ****************************************/

    INPUT_GENOME       = "/full/path/to/genome seq." // FASTA format
    INPUT_MASKEDGENOME = "/full/path/to/masked genome seq." // FASTA format
    INPUT_REPOUT       = "/full/path/to/output from RepeatMasker" // An output file from RepeatMasker
    // RNA-Seq-based method
    INPUT_RNASEQR1     = "/full/path/to/RNA-Seq read 1" // FASTQ format
    INPUT_RNASEQR2     = "/full/path/to/RNA-Seq read 1" // FASTQ format
    // Homology-based method
    HOMOLOGY_DATA = [
        "PREFIX"  : ["SpeciesA",  // a prefix of a file name (any string that can be used as a file name)
                     "SpeciesB",  // a prefix of a file name (any string that can be used as a file name)
                     "SpeciesC"], // a prefix of a file name (any string that can be used as a file name)
        "PROTEIN" : ["/path/to/SpeciesA.faa",  // a full path to a file containing SpeciesA
                     "/path/to/SpeciesB.faa",  // a full path to a file containing SpeciesB
                     "/path/to/SpeciesC.faa"], // a full path to a file containing SpeciesC
        "SPALNDB" : ["", // a paramete file name *
                     "", // a paramete file name *
                     ""] // a paramete file name *
        // * parameter files of Spaln are in Spaln's source tree [Spaln's root/table/*]
        // * for example, "NematodC", "InsectDm", "Angiosp", "Fish_mdl", "Tetrapod", etc.
    ]
    // if you want to add other GFF files, comment out and/or edit following sentences
//    RNASEQ_OTHER1      = "/full/path/to?additional RNA-Seq-based method GFF"
//    RNASEQ_OTHER2      = "/full/path/to?additional RNA-Seq-based method GFF"
//    HOMOLOGY_OTHER1    = "/full/path/to?additional homology-based method GFF"
//    HOMOLOGY_OTHER2    = "/full/path/to?additional homology-based method GFF"
//    ABINITIO_OTHER1    = "/full/path/to?additional ab initio-based method GFF"
//    ABINITIO_OTHER2    = "/full/path/to?additional ab initio-based method GFF"

    /****************************************
     Output
     ****************************************/

    // --- Directory to publish results ---
    PDIR      = "/full/path/to/output directory" // like "/home/you/GINGERoutput/"
    PDIR_PREP = "${PDIR}/Prep" // *** No need to edit ***

    /****************************************
     Merge phase; step1
     ****************************************/

    MAPPING_WEIGHT  = 1.6 // genome-guided assembly-based method
    DENOVO_WEIGHT   = 1.4 // de novo assembly-based method
    AUGUSTUS_WEIGHT = 1.8 // ab initio-based method (Augustus)
    SNAP_WEIGHT     = 1.2 // ab initio-based method (SNAP)
    HOMOLOGY_WEIGHT = 2.0 // homology-based method
    // if you want to add other GFF files, comment out and/or edit following sentences
//    RNASEQ_OTHER1_WEIGHT = 1.0   // additional RNA-Seq-based method
//    RNASEQ_OTHER2_WEIGHT = 1.0   // additional RNA-Seq-based method
//    HOMOLOGY_OTHER1_WEIGHT = 1.0 // additional homology-based method
//    HOMOLOGY_OTHER2_WEIGHT = 1.0 // additional homology-based method
//    ABINITIO_OTHER1_WEIGHT = 1.0 // additional ab initio-abesd-based method
//    ABINITIO_OTHER2_WEIGHT = 1.0 // additional ab initio-abesd-based method


    /****************************************
     General
     ****************************************/
    
    // --- Path to GINGER ---
    GINGER      = "/full/path/to/GINGER" // like /home/you/GINGER_v1.0.0/
    GINGER_UTIL = "${GINGER}/util" // *** No need to edit ***

    // --- Scratch dirs ---
    SCRATCH     = "/full/path/to/scratch" // a path to scratch directory, like "/scratch"
    
    // --- ---
    N_THREAD    = 1 // Number of CPU (logical number)
    
    // --- ---
    MAX_MEMORY  = "64G" // Maximam memory size for your process to use, like "64G"
    
    // --- ---
    OPREFIX     = "ginger" // a prefix of output file name, *** No need to edit ***

    // --- ---
    NXF_TEMP    = "/tmp"
    
    /****************************************
     RNA-Seq mapping based
     ****************************************/

    PDIR_PREP_MAPPING            = "${PDIR_PREP}/mapping" // *** No need to edit ***
    PDIR_PREP_MAPPING_MAPPING    = "${PDIR_PREP_MAPPING}/mapping"  // *** No need to edit ***
    PDIR_PREP_MAPPING_MERGE      = "${PDIR_PREP_MAPPING}/merge" // *** No need to edit ***
    PDIR_PREP_MAPPING_TOLEARN1ST = "${PDIR_PREP_MAPPING}/to_learn_1st" // *** No need to edit ***
    PDIR_PREP_MAPPING_TOLEARN2ND = "${PDIR_PREP_MAPPING}/to_learn_2nd" // *** No need to edit ***
    UTILPATH_MAPPING             = "${GINGER_UTIL}/mapping" // *** No need to edit ***
    
    // --- Tools for mapping ---
    HISAT2      = "/path/to/hisat2" // a full path to HISAT2 command "hisat2"
    HISAT2BUILD = "/path/to/hisat2-build" // a full path to HISAT2 build command "hisat2-build"
    SAMTOOLS    = "/path/to/samtools" // a full path to SMAtools command "samtools"
    STRINGTIE   = "/path/to/stringtie" // a full path to StringTie command "stringtie"
    SEQKIT      = "/path/to/seqkit" // a full path to Seqkit command "seqkit" 
    
    // --- Tools for to_merge ---
    TD_LONGORFS = "/path/to/TransDecoder.LongOrfs" // a full path to TransDecoder command "TransDecoder.LongOrfs"
    TD_PREDICT  = "/path/to/TransDecoder.Predict" // a full path to TransDecoder command "TransDecoder.Predict"

    // --- Tools for to_learn_1st.sh ---
    GFFREAD     = "/path/to/gffread" // a full path to GffRead command "gffread"
    CD_HIT      = "/path/to/cd-hit" // a full path to CD-HIT command "cd-hit"

    // --- Options for to_merge ---
    MIN0        = 90  // Minimum protein length (AA)
    MIN1        = 300 // Minimum contig length (bp)

    /****************************************
     RNA-Seq denovo based
     ****************************************/

    PDIR_PREP_DENOVO         = "${PDIR_PREP}/denovo" // *** No need to edit ***
    PDIR_PREP_DENOVO_TRINITY = "${PDIR_PREP_DENOVO}/trinity" // *** No need to edit ***
    PDIR_PREP_DENOVO_OASES   = "${PDIR_PREP_DENOVO}/oases" // *** No need to edit ***
    UTILPATH_DENOVO          = "${GINGER_UTIL}/denovo" // *** No need to edit ***

    // --- Tools for denovo ---
    DENOVO_PYTHON   = "/path/to/python" // a path to Python "python"
    VELVETH         = "/path/to/velveth" // a path to Velvet command "velveth"
    VELVETG         = "/path/to/velvetg" // a path to Velvet command "velveth"
    OASES           = "/path/to/oases" // a path to Oases command "oases"
    TRINITY         = "/path/to/Trinity" // a path to Trinity command "Trinity"
    GMAP_BUILD      = "/path/to/gmap_build" // a path to GMAP command "gmap_build"
    GMAP            = "/path/to/gmap" // a path to GMAPL command "gmap"
    CD_HIT_EST      = "/path/to/cd-hit-est" // a path to CD-HIT command "cd-hit-est"

    // --- Options related to trinity ---
    OPREFIX_TRINITY = "trinityGinger" // *** No need to edit ***
    SRA_FLAG        = 1 // 1: if the RNA-Seq data was obtained from SRA, 0: if not

    /****************************************
     Homology based
     ****************************************/

    PDIR_PREP_HOMOLOGY                = "${PDIR_PREP}/homology" // *** No need to edit ***
    PDIR_PREP_HOMOLOGY_HOMOLOGY       = "${PDIR_PREP_HOMOLOGY}/homology" // *** No need to edit ***
    PDIR_PREP_HOMOLOGY_HOMOLOGYMERGE  = "${PDIR_PREP_HOMOLOGY}/homology_merge" // *** No need to edit ***
    PDIR_PREP_HOMOLOGY_HOMOLOGYFILTER = "${PDIR_PREP_HOMOLOGY}/homology_filter" // *** No need to edit ***
    UTILPATH_HOMOLOGY                 = "${GINGER_UTIL}/homology" // *** No need to edit ***

    // --- Tools for homology ---
    SPALN             = "/path/to/spaln" // a full path to Spaln command "spaln"
    MAKEIDX           = "/path/to/makeidx.pl" // a full path to Spaln command "makeidx.pl"
    MAKBLK            = "/path/to/makblk.pl" // a full path to Spaln command "makblk.pl"        

    /****************************************
     Ab initio based
     ****************************************/

    PDIR_PREP_ABINITIO          = "${PDIR_PREP}/abinitio" // *** No need to edit ***
    PDIR_PREP_ABINITIO_AUGUSTUS = "${PDIR_PREP_ABINITIO}/augustus" // *** No need to edit ***
    PDIR_PREP_ABINITIO_SNAP     = "${PDIR_PREP_ABINITIO}/snap" // *** No need to edit ***
    UTILPATH_ABINITIO           = "${GINGER_UTIL}/abinitio" // *** No need to edit ***

    // --- Tools and options related to Augustus ---
    AUGUSTUS_DIR           = "/path/to/augustusSourceTree" // a full path to a directory that Augustus source tree exists
    AUGUSTUS               = "${AUGUSTUS_DIR}/bin/augustus" // *** No need to edit ***
    ETRAINING              = "${AUGUSTUS_DIR}/bin/etraining" // *** No need to edit ***
    AUGUSTUS_SCRIPT_DIR    = "${AUGUSTUS_DIR}/scripts" // *** No need to edit ***
    AUGUSTUS_CONFIG_DIR    = "${AUGUSTUS_DIR}/config" // *** No need to edit ***
    AUGUSTUS_SPEC_DIR      = "${AUGUSTUS_DIR}/config/species" // *** No need to edit ***
    AUGUSTUS_WORK_DIR      = "${PDIR}/augustus_config" // *** No need to edit ***
    AUGUSTUS_SPEC          = "ginger" // a directory name that stores a new trained model
                                      // the name must be unique within "[Augutus root]/config/species/"
    AUGUSTUS_TRAINING_DATA = "${PDIR_PREP_MAPPING_TOLEARN2ND}/${OPREFIX}_learn_2nd.gff3" // *** No need to edit ***
                                      // AUGUSTUS_TRAINING_DATA is used if you run mapping.nf and abinitio.nf separately
    AUGUSTUS_TRAINING_SIZE = 1000  // Number of gene structures for training
    
    // --- Tools and options related to SNAP ---
    SNAP_DIR                = "/path/to/snapSourceTree" // a full path to a directory that SNAP source tree exists
    FATHOM                  = "${SNAP_DIR}/fathom" // *** No need to edit ***
    FORGE                   = "${SNAP_DIR}/forge" // *** No need to edit ***
    SNAP                    = "${SNAP_DIR}/snap" // *** No need to edit ***
    SNAP_TRAINING_DATA  = "${PDIR_PREP_MAPPING_TOLEARN2ND}/lemon_learn_2nd.gff3" // *** No need to edit ***
                                      // SNAP_TRAINING_DATA is used if you run mapping.nf and abinitio.nf separately
    SNAP_SPECIES        = "${OPREFIX}" // *** No need to edit ***
    SNAP_TRAINING_SIZE  = AUGUSTUS_TRAINING_SIZE // *** No need to edit ***
    
}
